<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: group.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12cda917fe1d7c8b4e7d2501bb3636e4.html">sdk</a></li><li class="navelem"><a class="el" href="dir_2f23e30b638d6a5f333babd9a5d183e1.html">include</a></li><li class="navelem"><a class="el" href="dir_d5ace589187da7c83c1a7507ec9fbbef.html">sifteo</a></li><li class="navelem"><a class="el" href="dir_9f7c4e3b7feb35fe458a50f9a0128960.html">asset</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">group.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -*- mode: C; c-basic-offset: 4; intent-tabs-mode: nil -*-</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * This file is part of the public interface to the Sifteo SDK.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright &lt;c&gt; 2012 Sifteo, Inc. All rights reserved.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#ifdef NOT_USERSPACE</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#   error This is a userspace-only header, not allowed by the current build.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;sifteo/abi.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;sifteo/limits.h&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;sifteo/macros.h&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;sifteo/math.h&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span>Sifteo {</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html">   35</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    _SYSAssetGroup sys;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    _SYSAssetGroupCube cubes[<a class="code" href="group__macros.html#gad346cd2ed2f73697fa42a3445cf2fc57" title="Compile-time cube limit for the current application.">CUBE_ALLOCATION</a>];</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#a59637604c6af880af9addebe442a3fb3">   40</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetGroup&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">operator</span> _SYSAssetGroup&amp; () { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetGroup* () <span class="keyword">const</span> { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">operator</span> _SYSAssetGroup* () { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#ace586bf9d043a3c2b8fcd930e1cf9c9e">   53</a></span>&#160;    <a class="code" href="group__macros.html#gaa1dec568e79152c892dcf63f445cbd7a" title="Always enable inlining for one function.">ALWAYS_INLINE</a> <span class="keyword">const</span> _SYSAssetGroupHeader *<a class="code" href="struct_sifteo_1_1_asset_group.html#ace586bf9d043a3c2b8fcd930e1cf9c9e" title="Get a pointer to the read-only system data for this asset group.">sysHeader</a>(<span class="keywordtype">bool</span> requireConst=<span class="keyword">false</span>)<span class="keyword"> const</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="comment">// AssetGroups are typically in RAM, but we want the static</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="comment">// initializer data so that our return value is known at compile time.</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        _SYSAssetGroup *G = (_SYSAssetGroup*)</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            _SYS_lti_initializer(reinterpret_cast&lt;const void*&gt;(&amp;sys), requireConst);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>_SYSAssetGroupHeader*<span class="keyword">&gt;</span>(G-&gt;pHdr);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#a7c86f2c89aa78e8857ce0b3c12d2d491">   65</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#a7c86f2c89aa78e8857ce0b3c12d2d491" title="Get the size of this asset group, in tiles.">numTiles</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#ace586bf9d043a3c2b8fcd930e1cf9c9e" title="Get a pointer to the read-only system data for this asset group.">sysHeader</a>()-&gt;numTiles;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#aeacc79466392ef586e654b0c64406fd3">   74</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#aeacc79466392ef586e654b0c64406fd3" title="How many tiles will this group use up in its AssetSlot?">tileAllocation</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordflow">return</span> roundup&lt;unsigned&gt;(<a class="code" href="struct_sifteo_1_1_asset_group.html#a7c86f2c89aa78e8857ce0b3c12d2d491" title="Get the size of this asset group, in tiles.">numTiles</a>(), _SYS_ASSET_GROUP_SIZE_UNIT);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#a578e54dac23b6f52c909f75421d80df0">   81</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#a578e54dac23b6f52c909f75421d80df0" title="Get the compressed size of this asset group, in bytes.">compressedSize</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#ace586bf9d043a3c2b8fcd930e1cf9c9e" title="Get a pointer to the read-only system data for this asset group.">sysHeader</a>()-&gt;dataSize;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908">   95</a></span>&#160;    uint16_t <a class="code" href="struct_sifteo_1_1_asset_group.html#aec1526f48df5c2662ffb722595382908" title="Return the base address of this asset group, as loaded onto the specified cube.">baseAddress</a>(_SYSCubeID cube)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(cube &lt; <a class="code" href="group__macros.html#gad346cd2ed2f73697fa42a3445cf2fc57" title="Compile-time cube limit for the current application.">CUBE_ALLOCATION</a>);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">return</span> cubes[cube].baseAddr;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#a5fc86e767b5dbe949a7acd43f5ff9cf7">  115</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#a5fc86e767b5dbe949a7acd43f5ff9cf7" title="Is this AssetGroup installed on all cubes in the given vector?">isInstalled</a>(_SYSCubeIDVector <a class="code" href="group__math.html#gab18c9af04a4a3a4a3c63656e40ab74ed" title="Create a Vector2, from a set of (x,y) coordinates.">vec</a>) {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">return</span> _SYS_asset_findInCache(*<span class="keyword">this</span>, vec) == <a class="code" href="group__math.html#gab18c9af04a4a3a4a3c63656e40ab74ed" title="Create a Vector2, from a set of (x,y) coordinates.">vec</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="struct_sifteo_1_1_asset_group.html#a6e127d825197fdfec78d505bcf5ccc3b">  127</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#a6e127d825197fdfec78d505bcf5ccc3b" title="Is this AssetGroup installed on a particular cube?">isInstalled</a>(_SYSCubeID cube) {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_sifteo_1_1_asset_group.html#a5fc86e767b5dbe949a7acd43f5ff9cf7" title="Is this AssetGroup installed on all cubes in the given vector?">isInstalled</a>(_SYSCubeIDVector(0x80000000 &gt;&gt; cube));</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;};</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html">  162</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_sifteo_1_1_asset_slot.html" title="AssetSlots are numbered containers, in a cube&#39;s flash memory, which can hold AssetGroups.">AssetSlot</a> {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    _SYSAssetSlot sys;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#ad1521bb18cf4f7880f0bc39a7506c4fd">  167</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#ad1521bb18cf4f7880f0bc39a7506c4fd" title="Explicit conversion from a system object.">AssetSlot</a>(_SYSAssetSlot sys) : sys(sys) {}</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#a4515da105a44cdb2dc397bc6b9b852c5">  170</a></span>&#160;    <a class="code" href="class_sifteo_1_1_asset_slot.html#a4515da105a44cdb2dc397bc6b9b852c5" title="Copy constructor.">AssetSlot</a>(<span class="keyword">const</span> <a class="code" href="class_sifteo_1_1_asset_slot.html" title="AssetSlots are numbered containers, in a cube&#39;s flash memory, which can hold AssetGroups.">AssetSlot</a> &amp;other) : sys(other.sys) {}</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#aecf395975c0678cd281c9a70f64e9e91">  173</a></span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetSlot&amp; () <span class="keyword">const</span> { <span class="keywordflow">return</span> sys; }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keyword">operator</span> <span class="keyword">const</span> _SYSAssetSlot* () <span class="keyword">const</span> { <span class="keywordflow">return</span> &amp;sys; }</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#ac1a4535a9092c9c82b546871c63b168b">  181</a></span>&#160;    <a class="code" href="group__macros.html#gaa1dec568e79152c892dcf63f445cbd7a" title="Always enable inlining for one function.">ALWAYS_INLINE</a> <span class="keyword">static</span> <a class="code" href="class_sifteo_1_1_asset_slot.html" title="AssetSlots are numbered containers, in a cube&#39;s flash memory, which can hold AssetGroups.">AssetSlot</a> <a class="code" href="class_sifteo_1_1_asset_slot.html#ac1a4535a9092c9c82b546871c63b168b" title="Statically allocate a new AssetSlot.">allocate</a>() {</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#ad1521bb18cf4f7880f0bc39a7506c4fd" title="Explicit conversion from a system object.">AssetSlot</a>(_SYS_lti_counter(<span class="stringliteral">&quot;Sifteo.AssetGroupSlot&quot;</span>, 0));</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#aa16026837199dd623d54aff876b6740a">  192</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#aa16026837199dd623d54aff876b6740a" title="How much space is remaining in this slot, measured in tiles?">tilesFree</a>(_SYSCubeIDVector cubes = -1)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="keywordflow">return</span> _SYS_asset_slotTilesFree(*<span class="keyword">this</span>, cubes);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#a2249ea0a973d5effa10893a5ba39d31f">  205</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#a2249ea0a973d5effa10893a5ba39d31f" title="Is there room in this slot to load a particular AssetGroup without erasing the slot?">hasRoomFor</a>(<span class="keyword">const</span> <a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> &amp;group, _SYSCubeIDVector cubes = -1)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#aa16026837199dd623d54aff876b6740a" title="How much space is remaining in this slot, measured in tiles?">tilesFree</a>(cubes) &gt;= group.<a class="code" href="struct_sifteo_1_1_asset_group.html#aeacc79466392ef586e654b0c64406fd3" title="How many tiles will this group use up in its AssetSlot?">tileAllocation</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#a3a63794dcc657e82e23c5adcbaf235b0">  222</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_sifteo_1_1_asset_slot.html#a3a63794dcc657e82e23c5adcbaf235b0" title="Erase this slot.">erase</a>(_SYSCubeIDVector cubes = -1)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        _SYS_asset_slotErase(*<span class="keyword">this</span>, cubes);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    }</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div>
<div class="line"><a name="l00239"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_asset_slot.html#a7b53b2b558b5241667b1d0976b0cbb93">  239</a></span>&#160;    <a class="code" href="group__macros.html#gaa1dec568e79152c892dcf63f445cbd7a" title="Always enable inlining for one function.">ALWAYS_INLINE</a> <a class="code" href="class_sifteo_1_1_asset_slot.html" title="AssetSlots are numbered containers, in a cube&#39;s flash memory, which can hold AssetGroups.">AssetSlot</a> <a class="code" href="class_sifteo_1_1_asset_slot.html#a7b53b2b558b5241667b1d0976b0cbb93" title="Mark a particular AssetGroup as a &quot;bootstrap&quot; asset for this slot.">bootstrap</a>(<a class="code" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> &amp;group)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="comment">// _SYSMetadataBootAsset</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        _SYS_lti_metadata(_SYS_METADATA_BOOT_ASSET, <span class="stringliteral">&quot;IBBBB&quot;</span>,</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            group.<a class="code" href="struct_sifteo_1_1_asset_group.html#ace586bf9d043a3c2b8fcd930e1cf9c9e" title="Get a pointer to the read-only system data for this asset group.">sysHeader</a>(<span class="keyword">true</span>), sys, 0, 0, 0);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <span class="comment">// Update base address from the cache. Make sure it was successful.</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        _SYSCubeIDVector <a class="code" href="group__math.html#gab18c9af04a4a3a4a3c63656e40ab74ed" title="Create a Vector2, from a set of (x,y) coordinates.">vec</a> = _SYS_asset_findInCache(group, -1);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(vec != 0);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;};</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;};  <span class="comment">// namespace Sifteo</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
